home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
comms
/
html-heaven
/
arexx
/
html-edword5.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-01-08
|
1KB
|
38 lines
/* HTML-Helper Arexx script sample
* Ver : 1.2 (7th January 1996)
* Copyright: Paul Kolenbrander (InterNet: paul@serena.iaehv.nl)
* Function : Pass on the HTML commands from HTML-Helper to EdWord Pro.
* Author : Martin Reddy, <mxr@dcs.ed.ac.uk>,
Simon Dick, <sidick@essex.ac.uk>
* Input : HTMLCMD - The HTML command to be inserted.
*/
OPTIONS RESULTS /* enable return codes */
PARSE ARG MYCMD HTMLCMD
HTMLCMD = SUBSTR(HTMLCMD,2, LENGTH(HTMLCMD)-1) /* strip leading space */
ADDRESS 'EDWORD' /* The editor's ARexx port */
IF POS('><',HTMLCMD) ~= 0 THEN DO /* Is it a split command */
IsSelected
IF (RESULT = -1) THEN DO
CMD2 = right(HTMLCMD,(LENGTH(HTMLCMD)-(LASTPOS('<',HTMLCMD))+1))
CMD1 = substr(HTMLCMD,1,(LENGTH(HTMLCMD)-LENGTH(CMD2)))
SetView OFF
SetMark 3
JumpToBlockStart
InsertText CMD1
JumpToBlockEnd
InsertText CMD2
JumpToMark 3
BlockOff
SetView ON
END
ELSE
InsertText HTMLCMD
END
ELSE
InsertText HTMLCMD /* the Insert command */
EXIT /* And exit the script.*/